|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.realtime.MemoryArea
javax.realtime.ImmortalMemory
ImmortalMemory
is a memory
resource that is unexceptionally available to all
schedulable objects and Java threads for use and allocation.
An immortal object may not contain references to any form of scoped memory,
e.g., VTMemory
,
LTMemory
,
VTPhysicalMemory
, or
LTPhysicalMemory
.
Objects in immortal have the same states with respect to finalization as objects in the standard Java heap, but there is no assurance that immortal objects will be finalized even when the JVM is terminated.
Methods from ImmortalMemory
should be overridden only by methods that use super
.
Field Summary |
Fields inherited from class javax.realtime.MemoryArea |
logic, sizeEstimator, sizeInBytes |
Constructor Summary | |
protected |
ImmortalMemory(long sizeInBytes)
Constructor. |
protected |
ImmortalMemory(long sizeInBytes,
java.lang.Runnable logic)
Constructor. |
protected |
ImmortalMemory(SizeEstimator sizeEstimator)
Constructor. |
protected |
ImmortalMemory(SizeEstimator sizeEstimator,
java.lang.Runnable logic)
Constructor. |
Method Summary | |
void |
executeInArea(java.lang.Runnable logic)
Execute the run() method from the logic
parameter using this memory area as
the current allocation context. |
static ImmortalMemory |
instance()
Returns a pointer to the singleton ImmortalMemory object. |
Methods inherited from class javax.realtime.MemoryArea |
enter, enter, getMemoryArea, memoryConsumed, memoryRemaining, newArray, newInstance, newInstance |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected ImmortalMemory(long sizeInBytes)
sizeInBytes
- The size of the
ImmortalMemory
in bytesprotected ImmortalMemory(long sizeInBytes, java.lang.Runnable logic)
sizeInBytes
- The size of the
ImmortalMemory
in byteslogic
- The logic to be executed in this
ImmortalMemory
protected ImmortalMemory(SizeEstimator sizeEstimator)
sizeEstimator
- The
SizeEstimator
for this
ImmortalMemory
protected ImmortalMemory(SizeEstimator sizeEstimator, java.lang.Runnable logic)
sizeEstimator
- The
SizeEstimator
for this
ImmortalMemory
logic
- The Runnable
object whose run()
method should be executed.Method Detail |
public static ImmortalMemory instance()
ImmortalMemory
object.
ImmortalMemory
object.public void executeInArea(java.lang.Runnable logic)
run()
method from the logic
parameter using this memory area as
the current allocation context. For a schedulable object, this saves the current
scope stack and replaces it with one consisting only of the
ImmortalMemory
instance;
restoring the original scope stack upon completion.Not currently implemented
executeInArea
in class MemoryArea
logic
- The Runnable
object whose run()
method should be executed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |